library(plotly)
library(RSQLite)
Ok, so here we can start annotating the genes. Right away we can see 3 rough regions:
Centroid of the “bubble”: 108.823, 71.102, 81.404
SELECT Gene, sqrt((x - 108.823) * (x - 108.823) + (y - 71.102) * (y - 71.102) + (z - 81.404) * (z - 81.404)) AS Radioid FROM Loci WHERE z < 175
It turns out that the bubble is empty:
Bubble radioids
Nevertheless, we can still consider bubble “internal” and “external” genes as ones that face inwards and outwards of the bubble. Average distance from the centroid is: 56.148
CREATE TABLE Labels AS
SELECT Gene,
CASE
WHEN z > 175 THEN "Hat"
ELSE CASE
WHEN (x - 108.823) * (x - 108.823) + (y - 71.102) * (y - 71.102) + (z - 81.404) * (z - 81.404) > 3152.644 THEN "External"
ELSE "Internal"
END
END Label
FROM Loci
conn <- dbConnect(RSQLite::SQLite(), "../../Results/yeast.sqlite")
genePositionsLabels <- dbGetQuery(conn, "SELECT Loci.Gene, x, y, z, Label FROM
Loci JOIN RoughFeatures ON Loci.Gene = RoughFeatures.Gene")
plot_ly(x=genePositionsLabels$x, y=genePositionsLabels$y, z=genePositionsLabels$z, type="scatter3d", mode="markers", text=genePositionsLabels$Gene, color=genePositionsLabels$Label)
dbDisconnect(conn)
Histone modifications are agnostic to our structural domain labels.
Histones agnostic to inside vs outside